package com.mql.onlinechatsystem.system.controller;

import com.alibaba.fastjson.JSONObject;
import com.mql.onlinechatsystem.system.service.ISysTagService;
import com.mql.onlinechatsystem.system.vo.SysTagVo;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author 马庆林
 * @since 2023-03-09
 */
@Api("标签菜单配置")
@RestController
@RequestMapping("/system/sysTag")
@CrossOrigin
public class SysTagController {
    @Autowired
    private ISysTagService iSysTagService;

    @GetMapping("/getTag")
    public JSONObject getTag(){
        JSONObject result=new JSONObject();
        List<SysTagVo> sysTagVos=iSysTagService.getTagList();
        result.put("code",200);
        result.put("message","查询成功！");
        result.put("data",sysTagVos);
        return result;
    }
}
